//
//  ClassesCollectionViewCell.m
//  UI14_UICollectionViewText(半塘晒单)
//
//  Created by Hanlingyu on 16/8/2.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "ClassesCollectionViewCell.h"

@implementation ClassesCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createView];
        
    }
    
    return self;
    
    
}

- (void)createView {
    
    _backgroundImageView = [[UIImageView alloc] initWithFrame:self.contentView.frame];
    _backgroundImageView.image = [UIImage imageNamed:@"food.jpg"];
    _backgroundImageView.backgroundColor = [UIColor greenColor];
    [self.contentView addSubview:_backgroundImageView];
    
    _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, 50)];
    _titleLabel.textAlignment = 1;
    _titleLabel.textColor = [UIColor whiteColor];
    _titleLabel.font = [UIFont systemFontOfSize:18 weight:2];
    _titleLabel.center = CGPointMake(self.contentView.frame.size.width / 2, self.contentView.frame.size.height / 2);
    _titleLabel.text = @"美食";
    [self.contentView addSubview:_titleLabel];
    
    
    
}

@end
